#include "OgreGLES2Plugin.h"
#include "OgreRoot.h"

namespace Ogre
{
	static const String sPluginName = "OpenGL ES 2.0 RenderSystem";

	GLES2Plugin::GLES2Plugin()
		: mRenderSystem(0)
	{
	}

	const String& GLES2Plugin::getName() const
	{
		return sPluginName;
	}

	void GLES2Plugin::install()
	{
		mRenderSystem = OGRE_NEW GLES2RenderSystem();

		Root::getSingleton().addRenderSystem(mRenderSystem);
		Root::getSingleton().setRenderSystem(mRenderSystem);
	}

	void GLES2Plugin::initialise()
	{
	}

	void GLES2Plugin::shutdown()
	{
	}

	void GLES2Plugin::uninstall()
	{
		OGRE_DELETE mRenderSystem;
		mRenderSystem = 0;
	}
}
